/**
 * 
 */
function ajaxCheckUserLogin() {
	var flag = false;
	$.ajax({
		url: 'ajaxCheckUserLogin.action',
		data: null,
		type: 'post',
		async: false,
		dataType: 'json',
		success: function (res) {
			var rs = res.result;
			if(rs == '0') {
				flag = true;
			}else {
				flag = false;
			}
		}
	});
	return flag;
}

function changeBgColor(idiv) {
	idiv.style.backgroundColor = "#C10000";
}
function unChangeBgColor(idiv) {
	idiv.style.backgroundColor = "";
}

function goToIndex() {
	location.href = 'index.action';
}
function goToShoppingCart() {
	location.href = 'shoppingCart.action';
}
function goToInitOrder() {
	if(ajaxCheckUserLogin()) {
		location.href = 'initOrder.action';
	}else {
		if(confirm("您当前未登录不能结算，是否去登录？")) {
			location.href = 'loginInit.action';
		}
	}
}